import { getStore } from "../../storage/storage"
import { axios } from "../../utils/axios"

// 获取招聘信息列表
export function getRecruitmentInfoList(parameter){
    return axios({
        url: "/recruitment-infor/getRecruitmentInfoList",
        method: 'get',
        params: parameter,
        headers: {
            token: getStore("token")
        },
    })
}

    // 得到全部公司的招聘信息列表
export function getAllcompanyRecruitList(parameter){
    return axios({
        url: "/recruitment-infor/getAllcompanyRecruitList",
        method: 'get',
        params: parameter,
        headers: {
            token: getStore("token")
        },
    })
}

// 获取企业列表
export const getEnterpriseList = (parameter) =>{
    return axios({
        url: "/recruitment-infor/getEnterpriseList",
        method: 'get',
        params: parameter,
        headers: {
            token: getStore("token")
        },
    })
}

// 添加或修改招聘信息
export const editOrAddRecruitInfo = (parameter)=>{
    return axios({
        url: "/recruitment-infor/editOrAddRecruitInfo",
        method: 'post',
        data: parameter,
        headers: {
            token: getStore("token")
        },
    })
}

export const delRecruInfo = (parameter) =>{
     return axios({
        url: "/recruitment-infor/delRecruInfo",
        method: 'post',
        data: parameter,
        headers: {
            token: getStore("token")
        },
    })
}

// 获取公司所有招聘信息
export const getCompanyRecruitInfoList = (parameter) =>{
    return axios({
       url: "/recruitment-infor/getCompanyRecruitInfoList",
       method: 'get',
       params: parameter,
       headers: {
           token: getStore("token")
       },
   })
}

// 获取招聘详情的所有信息
export const getPositionAllInfo = (parameter) => {
    return axios({
        url: "/recruitment-infor/getPositionAllInfo",
        method: 'get',
        params: parameter,
        headers: {
            token: getStore("token")
        },
    })
}